<?php
require_once '../config/config.php';
//require_once '../libs/ihelper.php';
?>

<div class="header-bar">
    <div class="header-content">
        <img class="logo" src="images/cashregister.png" />
        <p class="apptitle"><?php echo Config::getAppname() ?></p>
        <?php
        if (session_id() == '') {
            // session isn't started
            session_start();
        }
        ?>
        
        <div class="navbar">
        <?php
            if (array_key_exists('useremail', $_SESSION)) {
                echo "<ul>";
                echo "<li><a href='frontoffice.php'>Front Office</a></li>";
                echo "<li><a href='admissions.php'>Admissions</a></li>";
                echo "</ul>";
            }
        ?>
        </div>
        
        <p class="userinfo">
            <img src="images/user_silhouette.png"/>
        <?php
        if (array_key_exists('useremail', $_SESSION)) {
            echo ihelper::lang("WELCOME").", ". $_SESSION['useremail'] . " <a href='logout.php'>Signout</a>";
        } else {
            echo " Not Logged In";
        }
        ?>
        </p>
    </div>
</div>
